package com.example.hrmsaas.system.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 操作返回对象
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultObject {
    public static final ResultObject CLEAR_SUCCESS = new ResultObject("清空成功");
    public static final ResultObject CLEAR_ERROR =  new ResultObject("清空失败");;
    public static ResultObject LOGIN_SUCCESS = new ResultObject("登录成功");
    public static ResultObject LOGIN_ERROR = new ResultObject(-1,"登录失败");
    public static ResultObject ISNULL_USER = new ResultObject(-1,"用户不存在");
    public static ResultObject USERPWD_ERROR = new ResultObject(-1,"输入用户信息或密码错误");
    public static ResultObject ADD_SUCCESS = new ResultObject("添加成功");
    public static ResultObject ADD_ERROR   =  new ResultObject(-1,"添加失败");
    public static ResultObject SAVE_SUCCESS = new ResultObject("编辑成功");
    public static ResultObject SAVE_ERROR   = new ResultObject(-1,"编辑失败");
    public static ResultObject DELETE_SUCCESS = new ResultObject("删除成功");
    public static ResultObject DELETE_ERROR   = new ResultObject(-1,"删除失败");
    public static ResultObject DISPATCH_SUCCESS = new ResultObject("分配成功");
    public static final ResultObject DISPATCH_ERROR = new ResultObject("分配失败");


    public static final ResultObject RESET_SUCCESS = new ResultObject("重置成功");
    public static final ResultObject RESET_ERROR = new ResultObject("重置失败");
    public static final ResultObject EXPORT_SUCCESS = new ResultObject("导出成功");
    public static final ResultObject EXPORT_ERROR = new ResultObject("导出失败");
    public static final ResultObject EXPORT_NOTNLL = new ResultObject("请选择导出人员");
    public static final ResultObject INFO_ERROR = new ResultObject("暂无详情");


    private Integer code=200;
    private String  msg="";
    private Object data;
    public ResultObject(String msg){
       this.msg = msg;
   }

    public ResultObject(int i, String msg) {
        this.code = i;
        this.msg  = msg;
    }

    public ResultObject(int code,Object data){
        this.code = code;
        this.data = data;
    }

}
